<?php

namespace app\admin\controller\financial;

use service\JsonService;
use app\common\model as M;

/**
 * 财务统计模块
 *
 */
class Statistic extends \app\admin\controller\AuthController
{
	public $model = '\app\common\model\order\Statistic';

    /**
     * 财务统计事项汇总
     * @param    array            $post [description]
     * @return   [type]                 [description]
     */
    public function review ( )
    {
        return $this->fetch();
    }

    /**
     * 消费日度统计
     * @Author   FW
     * @DateTime 2022-05-12
     * @Email    123763712@qq.com
     * @return   [type]           [description]
     */
    public function get_consume_daily_chart()
    {
        $where = $this->request->get();
        return JsonService::successful($this->model::getConsumeDailyChart($where));
    }

    /**
     * 消费月度统计
     * @Author   FW
     * @DateTime 2022-05-12
     * @Email    123763712@qq.com
     * @return   [type]           [description]
     */
    public function get_consume_monthly_chart()
    {
        $where = $this->request->get();
        return JsonService::successful($this->model::getConsumeMonthlyChart($where));
    }

    /**
     * 充值月度统计
     * @Author   FW
     * @DateTime 2022-05-13
     * @Email    123763712@qq.com
     * @return   [type]           [description]
     */
    public function get_recharge_monthly_chart()
    {
        $where = $this->request->get();
        return JsonService::successful($this->model::getRechargeMonthlyChart($where));
    }
} //Class End